package com.hecate.user.webapi.controller;

import com.hecate.common.response.HecateResponse;
import com.hecate.user.api.req.user.SaveUserReq;
import com.hecate.user.dto.user.SaveUserDTO;
import com.hecate.user.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 黄星星
 * @date 2020-07-30
 */
@Api(value = "用户管理模块", tags = { "用户管理操作接口" })
@RestController
@RequestMapping("/userService/user")
public class UserController {

    @Autowired
    private UserService userService;

    @ApiOperation(value="新增用户",tags={"新增用户"})
    @PostMapping("/saveUser")
    public HecateResponse<SaveUserDTO> saveUser(@RequestBody SaveUserReq saveUserReq){
        HecateResponse saveUserHecateResponse = userService.saveUser(saveUserReq);
        return saveUserHecateResponse;
    }




}
